<?php
$pos = strpos($_SERVER['SERVER_NAME'], 'freeteam.streams.com');
if($pos === false){
	include_once('includes/classes/config.inc.php');
}else{
	include_once('includes/classes/config-local.inc.php');
}
include_once('includes/classes/class.database.php');
//include_once(abspath.'/includes/sitefuncs/securesession.class.php');
include_once(abspath.'/includes/funcs/homefuncs.php');
include_once(abspath.'/includes/funcs/function_absolute.php');

//header('Content-Type: application/json');
$messageError =  "We are not found channel detail.";
if(!empty($_GET['id'])){
	$channel = getChannel($_GET['id']);
	// echo @json_encode(array(
		// 'error'=>false,
		// 'message'=>'Get channel success',
		// 'data'=>$channel
	// ));
	
	if(!empty($channel)){
		echo $channel['embled_code'];
	}else{
		echo "<h1>{$messageError}</h1>";
	}
}else{
	// echo @json_encode(array(
		// 'error'=>true,
		// 'message'=>'We are not found channel detail.'
	// ));
	echo "<h1>{$messageError}</h1>";
	
}
	

?>